package com.heima.dynamic_sql.controller;


import com.heima.dynamic_sql.entity.Setmeal;
import com.heima.dynamic_sql.service.SetMealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auth: zhuan
 * @Desc: 套餐管理控制器
 */
@RestController
@RequestMapping("/setmeal")
public class SetmealController {

    @Autowired
    private SetMealService setMealService;
    /**
     * 功能描述: 根据套餐ID，获取套餐详细信息：套餐详情、套餐中检查组信息、检查组中检查项信息
     *
     * @param id
     * @return : com.heima.dynamic_sql.entity.Setmeal
     */
    @GetMapping("/findById/{id}")
    public Setmeal findById(@PathVariable("id") Integer id){
        return setMealService.findById(id);
    }
}
